package com.errasoftware.npa.test;

import java.io.IOException;
import java.util.Date;

import com.eraasoftware.npa.client.Header;
import com.eraasoftware.npa.io.ChannelBuffer;
import com.eraasoftware.npa.io.Serializer;
import com.eraasoftware.npa.server.ObjectActionHandler;

public class PersonActionHandler extends ObjectActionHandler<Person> {
	// register class (if needed) for the serializer

	static {
		Serializer.register(Person.class);
	}

	@Override
	public Person objectResponse(Header header, ChannelBuffer channel) throws IOException {
		Person person = new Person();
		person.name = "Eddie";
		person.birth = new Date();
		return person;
	}

}
